package java_thinking.unit_13._13_6;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

/**
 * @Description :   Scanner案例
 * @author: cww
 * @DateTime: 2019/3/26 8:37
 */

public class ScannerDemo {
    public static void main(String[] args) {
        try {
            Scanner scanner = new Scanner(new File("Hex.java"));
            while (scanner.hasNext()){
                System.out.println(scanner.next());
            }
        } catch (FileNotFoundException e) {
            System.out.println(e.getMessage());
        }
    }
}
